<?php

class ManagerController extends Zend_Controller_Action {

    public function __construct(Zend_Controller_Request_Abstract $request, Zend_Controller_Response_Abstract $response, array $invokeArgs = array()) {
        parent::__construct($request, $response, $invokeArgs);
    }

    public function preDispatch() {
        $auth = Zend_Auth::getInstance();
        if (!$auth->hasIdentity()) {
            if ($this->_request->getActionName() != 'admin') {
                $this->_redirect('admin');
            }
        }
    }

    public function indexAction() {
        $this->buildHead();
    }
    
    private function buildHead() {
        $base = $this->_request->getBaseUrl();
        $this->view->base = $base;       
    }
}

?>